package com.dl.dao;

import com.dl.pojo.Student;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author DL
 * @create 2021-03-23 14:16
 */
@Mapper
public interface StudentMapper {

    //查询总数
    int getTotal();

    //根据关键字查询总数
    int getTotalByKey(String keyWord);

    //增加
    int addStudent(Student student);

    //删除
    int deleteStudent(int id);

    //更新
    int updateStudent(Student student);

    //查询单个
    Student queryStudentById(int id);

    //查询全部
    List<Student> queryAllStudent();

    //分页查询
    List<Student> queryStudentByLimit(Map<String, Integer> map);

    //模糊查询
    List<Student> queryStudentByKey(Map<String, Object> map);

}
